<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title><?php echo ($title); ?></title>
<script type="text/javascript" src="../Public/js/jq.js"></script>
<script>
function check(){
	if($('#num').val() ==''){alert('数量不能为空');return false;}
}
$().ready(function(){
	$('#addid').attr('value','<?php echo $_GET["addid"];?>');
	$('#speid').attr('value','<?php echo $_GET["speid"];?>');
	$('#addid,#speid').change(function(){
		$('#form_action').submit();
	})
	
})
</script>
</head>
<body>
<fieldset><lenged>筛选条件</lenged>
<form action="__ACTION__" method="get" id="form_action">
<select name="addid" id="addid"><option value=''>请选择地区</option>
<?php if(is_array($address)): $i = 0; $__LIST__ = $address;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): ++$i;$mod = ($i % 2 )?><option value="<?php echo ($key); ?>"><?php echo ($vo); ?></option><?php endforeach; endif; else: echo "" ;endif; ?></select>
<input type="hidden" value="<?php echo $_GET["pid"];?>" name="pid" />

<select name="speid" id="speid"><option value="">请选择专业</option>
<?php if(is_array($speciality)): $i = 0; $__LIST__ = $speciality;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): ++$i;$mod = ($i % 2 )?><option value="<?php echo ($vo["specialityid"]); ?>"><?php echo ($vo["spe_name"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
</select>
</form>
</fieldset>
<table border="1">
<tr><td>地址</td><td>专业</td><td>学历层次</td><td>计划类型</td><td>招生人数</td><td>学制</td><td>科类</td><td>备注</td><td>操作</td></tr>
<?php if(is_array($content)): $i = 0; $__LIST__ = $content;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): ++$i;$mod = ($i % 2 )?><tr><td><?php echo ($address[$vo['address']]); ?></td><td><?php echo ($speciality[$vo['specialityid']]['spe_name']); ?></td>
<td><?php echo ($stu_type[$vo['educationid']]); ?></td>
<td><?php echo ($plan_type[$vo['plantype']]); ?></td>
<td><?php echo ($vo["num"]); ?></td>
<td><?php echo ($vo["lengthofschooling"]); ?>年制</td>
<td><?php echo ($subject[$vo['subjecttype']]); ?></td>
<td><?php echo ($vo["remark"]); ?></td>
<td><a href="__URL__/delplanitem/id/<?php echo ($vo["id"]); ?>">删</a></td>
</tr><?php endforeach; endif; else: echo "" ;endif; ?>
</table>
<?php echo ($page); ?>
<!-- 添加新数据 -->
<fieldset>
<legend>添加新数据</legend>
<form action="__URL__/addplan/" method="post" onsubmit="return check()">
<input type="hidden" name="pid" value="<?php echo $_GET["pid"];?>" />
<p>地区：<select name="address"><?php if(is_array($address)): $i = 0; $__LIST__ = $address;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): ++$i;$mod = ($i % 2 )?><option value="<?php echo ($key); ?>"><?php echo ($vo); ?></option><?php endforeach; endif; else: echo "" ;endif; ?></select>
专业：<select name="specialityid"><?php if(is_array($speciality)): $i = 0; $__LIST__ = $speciality;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): ++$i;$mod = ($i % 2 )?><option value="<?php echo ($vo["specialityid"]); ?>"><?php echo ($vo["spe_name"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
</select>
教育层次:<select name="educationid">
<?php if(is_array($stu_type)): $i = 0; $__LIST__ = $stu_type;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): ++$i;$mod = ($i % 2 )?><option value="<?php echo ($key); ?>"><?php echo ($vo); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
</select>
计划类型：<select name="plantype">
<?php if(is_array($plan_type)): $i = 0; $__LIST__ = $plan_type;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): ++$i;$mod = ($i % 2 )?><option value="<?php echo ($key); ?>"><?php echo ($vo); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
</select>
招生数量:<input type="text" name="num" id="num" length="2" />
学制:<select name="lengthofschooling"><option value="3">3年制</option>
<option value="4">4年制</option></select>
科类:<select name="subjecttype">
<?php if(is_array($subject)): $i = 0; $__LIST__ = $subject;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): ++$i;$mod = ($i % 2 )?><option value="<?php echo ($key); ?>"><?php echo ($vo); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
</select>
<input type="submit" value="添加" /></p>
</form>
</fieldset>
</body>
</html>